<include file="Public/header.html"/>

    <div class="cm-mian">
        <div class="cml-g">
            <div class="am-u-sm-3 am-u-md-3 am-u-lg-3">
                <div class="cm-type">
                    <ul>
                        <foreach name="sort" item="s">
                            <li onclick="get_product(this,{$s['id']})" class="pr" data="{$s['id']}" style="cursor:pointer;"><a href="javascript:;">{$s['sort']}</a></li>
                        </foreach>
                    </ul>
                </div>
            </div>
            <div class="am-u-sm-9 am-u-md-9 am-u-lg-9">
                   <div class="cm-article">
                       <div class="cm-new-list cm-content" id="ajax_product">
                            

<!-- 分页 -->
                       </div>
                   </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
    var pr1 = "{:I('pr')}";
    if(pr1 == ''){
        var pr = $('.pr').eq(0);
    }else{
        var pr = $('.pr').eq(pr1);
    }
    pr.addClass('on').siblings().removeClass('on');
    var id =pr.attr('data');
    $.post({
        url:"{:U('get_product')}",
        data:{id:id},
        success:function(e){
            if(e.status == 2){
                $('#ajax_product').html(e.info);
            }else{
                $('#ajax_product').html(e);
            }
        }
    })
    function get_product(ele,id){
        $(ele).addClass('on').siblings().removeClass('on');
        $.post({
            url:"{:U('get_product')}",
            data:{id:id},
            success:function(e){
                if(e.status == 2){
                    $('#ajax_product').html(e.info);
                }else{
                    $('#ajax_product').html(e);
                }
            }
        })
        return false;
    }
</script>
    ﻿<include file="Public/footer.html"/>
</body>
</html>